package org.lemon.db.tx;

import org.lemon.db.store.BlockId;
import org.lemon.db.store.Page;

/**
 * @since 2024-12-13 14:33
 */
public class TxSub implements Transaction{

    private Page page;

    public TxSub(Page page) {
        this.page = page;
    }

    @Override
    public void commit() {

    }

    @Override
    public void rollBack() {

    }

    @Override
    public void recover() {

    }

    @Override
    public void pin(BlockId blockId) {

    }

    @Override
    public void unPin(BlockId blockId) {

    }

    @Override
    public long getLong(BlockId blockId, int offset) {
        return 0;
    }

    @Override
    public String getString(BlockId blockId, int offset) {
        return null;
    }

    @Override
    public void setLong(BlockId blockId, int offset, long val, boolean flushed) {

    }

    @Override
    public void setInt(BlockId blockId, int offset, int val, boolean flushed) {
        page.setInt(offset,val);
    }

    @Override
    public void setString(BlockId blockId, int offset, String s, boolean flushed) {
        page.setString(offset,s);
    }

    @Override
    public int availableBuffers() {
        return 0;
    }

    @Override
    public int size(String fileName) {
        return 0;
    }

    @Override
    public BlockId append(String fileName) {
        return null;
    }

    @Override
    public int blockSize() {
        return 0;
    }
}
